package hr.fer.pus.dll_will.sp;

public class SPDescriptor {
	private String spName;
	private String spAddress;
	
	public SPDescriptor() { }
	
	public SPDescriptor(String name, String adr) {
		this.spName = name;
		this.spAddress = adr;
	}
	
	public String getSpAddress() {
		return spAddress;
	}


	public void setSpAddress(String spAddress) {
		this.spAddress = spAddress;
	}

	public String toString() {
		return this.spName + " " + this.spAddress;
	}

	public String getSpName() {
		return spName;
	}

	public void setSpName(String spName) {
		this.spName = spName;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((spName == null) ? 0 : spName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SPDescriptor other = (SPDescriptor) obj;
		if (spName == null) {
			if (other.spName != null)
				return false;
		} else if (!spName.equals(other.spName))
			return false;
		return true;
	}
}
